package Arrayexer;

public class Sort
{
	public static void main(String[] args)
	{
		int[] arrOne =
		{ 12, 23, 34, 11, 21, 15 };
		System.out.println("====排序前====");
		for (int i = 0; i < arrOne.length; i++)
		{
			System.out.println(arrOne[i]);
		}
		System.out.println("=====排序后=====");
		for (int i = 0; i < arrOne.length; i++)
		{
			for (int j = i; j < arrOne.length; j++)
			{
				if(arrOne[i]>arrOne[j]) 
				{
					int bei = arrOne[i];
					arrOne[i] = arrOne[j];
					arrOne[j] = bei;
				}	
			}
		}
		for (int i = 0; i < arrOne.length; i++)
		{
			System.out.println(arrOne[i]);
		}
	}
}
